Next: Rendering Up: The implementation Previous: Editing

Grouping and copying

By default, objects are automatically unidirectionally grouped with the surface on which they were created, an idea borrowed from Bukowski and Sequin [6], generally resulting in hierarchical scenes. Each geometric object in SKETCH contains a list of objects that are grouped to it. Whenever an object is transformed, that object will also apply the same transformation to all other objects that are grouped to it; each grouped object will in turn transform all objects grouped to itself. Cycles can occur and are handled by allowing each object to move only once for each mouse motion event.

This kind of hierarchical scene is generally easier to manipulate than a scene without groupings since the grouping behavior typically corresponds to both expected and useful relationships among objects. For example, objects drawn on top of a table move whenever the table is manipulated, but when the objects are manipulated, the table does not follow. Grouping also applies to non-vertical relationships, so a picture frame drawn on a wall is grouped with the wall.

In some cases, grouping is bidirectional. The choice of bi-directional and uni-directional grouping is guided by what we believe is an inherent difference in the way people interpret relationships between certain horizontal versus vertical drawing elements. When an object is drawn that extends horizontally between two surfaces, like a rung on a ladder, the two surfaces that are spanned are grouped bidirectionally, so that if one rail of the ladder moves so does the other. Although the rung moves whenever either rail is manipulated, the rails do not move when the rung is manipulated. The grouping relationship for objects that span vertically, however, establishes only one-way relationships: the topmost object is unidirectionally grouped to the bottommost object and the spanning object is similarly grouped to the topmost object. Thus, a table leg that spans between a floor and a table top causes the top to be grouped to the floor and the leg to be grouped to the top, but the floor is not grouped to the top. We only exploit the difference between horizontal and vertical elements to distinguish these two grouping relationships. However we believe it is important to study with user tests how effective this automatic grouping approach actually is, and perhaps to determine as well if there are other ways that we might be able to exploit the differences between vertical and horizontal elements.

Unlike Bukowski, object grouping is not automatically recomputed as objects are moved around the scene. Therefore, if an object is moved away from a surface, it will still be grouped with the surface. Grouping relationships are recomputed only when objects are moved using the contact constraint mentioned in Section 4.3 -- the moved object is grouped to the surface it now contacts and ungrouped from any surface it no longer contacts. We have found this approach to automatic grouping to be simple and effective, although in some environments, Bukowski's approach may be more appropriate.

Lassoing groups. SKETCH also allows the user to explicitly establish groups by stroking a lasso around them (Figure 6).(6) Deciding which objects are considered inside the lasso is based on the heuristic that the geometric center and all of the visible corners of the object must be inside the lasso; shapes like spheres must be completely contained in the lasso. SKETCH currently approximates this heuristic by first projecting an object's geometric center and all of its crease vertices (where there is a discontinuity in the derivative of the surface) and silhouette vertices into the film plane, then testing whether all these projected points are contained within the lasso. Currently, no test is made for whether objects are occluded or not; future work should address the ambiguities that arise in using the lasso operation.

  
Figure 6:Lassoing objects is used to group, copy, scale and move collections of obejcts. A closed curve around some objects groups them; a click and drag manipulation drags the group of lassoed objects. A closed curve around some objects followed by a click and drag manipulation on the curve scales the objects. A closed curve around some objects followed by a click and drag manipulation with the shift key copies the objects. (see legend)

All lassoed objects are copied if they are manipulated while the Shift modifier is used. Lassoed objects can be scaled by dragging the lasso itself.

Repeating gestures. A different form of copying is used when a user wants to repeat the last geometry-creation operation. After SKETCH recognizes gesture strokes corresponding to a geometric construction, it creates and places the new geometry in the scene, but does not erase the gesture strokes. Thus, the user can click on any of these strokes (using button 1) in order to ``drag and drop'' (re-execute) them elsewhere. Gesture strokes are erased when a new gesture is started or when any object is manipulated. These techniques are shown in the videotape.

Next: Rendering Up: The implementation Previous: Editing